package com.ruoyi.common.entity.TransactionEntity;

import com.ruoyi.common.entity.CoreEntity.Members;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户购物车对象 shop_cart_item
 * 
 * @author swy
 * @date 2025-08-07
 */
public class ShopCartItem extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    private Members members;

    public Members getMembers() {
        return members;
    }

    private Sku sku;

    public Sku getSku() {
        return sku;
    }

    public void setSku(Sku sku) {
        this.sku = sku;
    }
    private Spu spu;

    public Spu getSpu() { return spu; }
    public void setSpu(Spu spu) { this.spu = spu; }
    public void setMembers(Members members) {
        this.members = members;
    }
    /** 购物车项ID，主键自增 */
    private Integer id;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Integer membersId;

    /** 商品SKU ID */
    @Excel(name = "商品SKU ID")
    private Integer skuId;

    /** 商品数量 */
    @Excel(name = "商品数量")
    private Integer quantity;

    /** 是否选中结算（0-未选中，1-已选中） */
    @Excel(name = "是否选中结算", readConverterExp = "0=-未选中，1-已选中")
    private Integer selected;

    /** 删除标志（0未删除，1已删除） */
    private String delFlag;

    public void setId(Integer id) 
    {
        this.id = id;
    }

    public Integer getId() 
    {
        return id;
    }

    public void setMembersId(Integer membersId) 
    {
        this.membersId = membersId;
    }

    public Integer getMembersId() 
    {
        return membersId;
    }

    public void setSkuId(Integer skuId) 
    {
        this.skuId = skuId;
    }

    public Integer getSkuId() 
    {
        return skuId;
    }

    public void setQuantity(Integer quantity) 
    {
        this.quantity = quantity;
    }

    public Integer getQuantity() 
    {
        return quantity;
    }

    public void setSelected(Integer selected) 
    {
        this.selected = selected;
    }

    public Integer getSelected() 
    {
        return selected;
    }

    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("membersId", getMembersId())
            .append("skuId", getSkuId())
            .append("quantity", getQuantity())
            .append("selected", getSelected())
            .append("delFlag", getDelFlag())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
